import Skeleton from './Skeleton'
import Slider from './Slider'
import More from './More'
import Bread from './Bread'
import BreadItem from './Bread/item.vue'
import InfiniteLoad from './InfiniteLoad'

/**
 * 优化：怎么循环注册全局组件？
 * 1，把组件放到数组里
 * 2，循环放组件数组全局注册
 *
 */
const cps = [Skeleton, Slider, More, Bread, BreadItem, InfiniteLoad]
export default {
  install (app) {
    console.log(app)
    // app.component(Skeleton.name, Skeleton)
    // app.component(Slider.name, Slider)
    cps.forEach(cp => {
      app.component(cp.name, cp)
    })
  }
}
